home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / mt.z / mt
Encoding:
Text File  |  2002-10-03  |  17.9 KB  |  397 lines

  1.  
  2.  
  3.  
  4. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mt - magnetic tape manipulating program
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmtttt [ ----ffff ttttaaaappppeeeennnnaaaammmmeeee ] command [ count ]
  13.      mmmmtttt [ ----tttt ttttaaaappppeeeennnnaaaammmmeeee ] command [ count ]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _m_t is used to give commands to the magnetic tape drives.  By default, _m_t
  17.      performs the requested operation using /_d_e_v/_n_r_t_a_p_e.  Normally the
  18.      operations are performed once.  Some operations may be performed multiple
  19.      times by specifying _c_o_u_n_t . For all others, _c_o_u_n_t is ignored.  _c_o_u_n_t is
  20.      parsed with the _s_t_r_t_o_l(3) library routine, which means that values with
  21.      leading 0's are taken as octal, those with leading 0x or 0x are taken to
  22.      be hex, and other's are taken to be decimal.
  23.  
  24.      To use an alternate device, one of the options ----ffff ttttaaaappppeeeennnnaaaammmmeeee or ----tttt ttttaaaappppeeeennnnaaaammmmeeee
  25.      may be specified.  If one of these options is not used, then _m_t will
  26.      check for an environment variable TTTTAAAAPPPPEEEE and use that, if set.  Otherwise
  27.      the default device, /_d_e_v/_n_r_t_a_p_e is used.
  28.  
  29.      The ttttaaaappppeeeennnnaaaammmmeeee field can also reference a remote tape device.  A remote
  30.      tape device name has the form:
  31.  
  32.           [_u_s_e_r@]system:/dev/???
  33.  
  34.      Where _s_y_s_t_e_m is the remote system, /_d_e_v/??? is the particular drive on
  35.      the remote system (raw, rewinding, non-rewinding, etc.), and the optional
  36.      _u_s_e_r is the login name to be used on the remote system (the default is
  37.      the current login name).  The interface requires that the device portion
  38.      of the name start with /_d_e_v in order to be considered as a potential
  39.      remote device.
  40.  
  41.      Note that when using a remote tape device, many commands may not be
  42.      supported by machines not running IRIX, and the meaning of some of the
  43.      status and position bits for the ssssttttaaaattttuuuussss command may differ.
  44.  
  45.      If the rewind device is used, some commands are (long) null operations.
  46.      In particular, the ffffeeeeoooommmm and ffffssssffff commands will result in the tape being
  47.      positioned at BOT when the rewind device is used, rather than the
  48.      requested position.
  49.  
  50.      The available commands are listed below.  Only as many characters as are
  51.      required to uniquely identify a command need be specified.  Note that not
  52.      all commands are implemented for all devices.  For most of the commands
  53.      that accept a count, the default is 1, if not specified.  Not all
  54.      commands are implemented by all devices or device drivers.  Some may
  55.      return an error, others may return with no error, but not do anything
  56.      (such as attempting to retension a tape on a DAT drive).
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  71.  
  72.  
  73.  
  74.      For those cases where the description seems unclear, it may be helpful to
  75.      refer to the comments in ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////ssssyyyyssss////mmmmttttiiiioooo....hhhh.
  76.  
  77.      _m_t returns a 0 exit status when the operation was successful, a 1 if a
  78.      command was unrecognized, and a 2 if a operation failed.  _m_t without any
  79.      arguments defaults to hhhheeeellllpppp.
  80.  
  81.  
  82.      wwwweeeeooooffff Write _c_o_u_n_t end-of-file marks at the current position on the tape.
  83.  
  84.      wwwwsssseeeettttmmmmkkkk
  85.           Write _c_o_u_n_t setmarks at the current position on the tape; currently
  86.           only supported for DAT, setmarks are intended for grouping tape
  87.           files into sets.
  88.  
  89.      ffffssssffff  Forward space _c_o_u_n_t tape files.  The resulting position is on the
  90.           EOT side of the filemark.
  91.  
  92.      ffffssssrrrr  Forward space _c_o_u_n_t records (blocks).
  93.  
  94.      bbbbssssffff  Backspace _c_o_u_n_t tape files.  The resulting position is on the BOT
  95.           side of the filemark.
  96.  
  97.      bbbbssssrrrr  Backspace _c_o_u_n_t records (blocks).
  98.  
  99.      ssssppppsssseeeettttmmmmkkkk
  100.           space _c_o_u_n_t setmarks.  The count is negative to space towards BOT,
  101.           and positive to space towards EOT.
  102.  
  103.      rrrreeeewwwwiiiinnnndddd
  104.           Rewind the tape to BOT, or in the case of partitioned tapes, to the
  105.           beginning of the current partition (it does NOT change partitions).
  106.  
  107.      ssssppppppppaaaarrrrtttt
  108.           Space to the given partition.  Currently only supported for DAT
  109.           tape.  The resulting position is the beginning of the partition, if
  110.           it exists.  Only partitions 0 and 1 are supported for DDS format DAT
  111.           tapes.  Partition 1 is the one closest to BOT.  Once within a
  112.           partition, all other commands (except sppart or mkpart) apply to
  113.           that partition only, including rewind, erase, and feom.
  114.  
  115.      mmmmkkkkppppaaaarrrrtttt
  116.           Create a partitioned tape.  Currently only supported for DAT tape.
  117.           The argument specifies the size in megabytes of the partition
  118.           closest to BOT, which is known as partition 1.  That part of the
  119.           tape is written and checked for errors.  This is intended primarily
  120.           so that tape directories may be written at the beginning of the tape
  121.           with no possibility of overwriting the primary data on the tape.  An
  122.           argument of 0 creates a single partition tape again.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  137.  
  138.  
  139.  
  140.      ffffeeeeoooommmm Forward space to end of recorded data.  This allows appending new
  141.           tape files to a tape that already contains data.  For partitioned
  142.           tapes, positions to the end of recorded data in the current
  143.           partition.
  144.  
  145.      oooofffffffflllliiiinnnneeee
  146.           Rewind and unload the tape from the drives heads, allowing removal
  147.           of the tape.  The tape is not ejected for most drive types.
  148.            Use the uuuunnnnllllooooaaaadddd option to force ejection (for drives that support
  149.           ejection or similar behavior; not all drives do).
  150.  
  151.      uuuunnnnllllooooaaaadddd
  152.           Inform  the drive it is OK for the tape to be removed.  This is
  153.           meaningful only for drives such as the 8mm drive that enable and
  154.           disable the eject button under software control.  Some drives will
  155.           otherwise not allow tape removal if the tape has not been previously
  156.           rewound.  If the drive supports it, the tape is ejected.
  157.  
  158.      eeeerrrraaaasssseeee
  159.           Erase from current position to EOT.  This can be very slow for some
  160.           tape drives (up to 2 hours for 8mm tape drives with 2.3Gb capacity).
  161.           Note that for QIC drives, aaaallllllll tracks are erased simultaneously (QIC
  162.           writes in serpentine fashion, with anywhere from 9-30 tracks,
  163.           currently).  This means that one should not expect to be able to
  164.           erase just the "tail end" of a QIC tape, without losing most, if not
  165.           all, of the data on the tape.  The erase function is not supported
  166.           on DAT drives when they are in audio mode.  The erase function is
  167.           not supported on Ampex DST drives.
  168.  
  169.      eeeexxxxiiiisssstttt
  170.           Exit with status 0 if the drive exists, otherwise non-zero; this is
  171.           primarily for use in scripts.
  172.  
  173.      rrrreeeecccceeeerrrrrrrroooonnnn
  174.           Enable soft error reporting for drives that are very verbose about
  175.           them, such as Cipher 540S; this persists until explicitly turned
  176.           off.  The default is rrrreeeecccceeeerrrrrrrrooooffffffff.
  177.  
  178.      rrrreeeecccceeeerrrrrrrrooooffffffff
  179.           Disable soft error reporting for drives that are very verbose about
  180.           them, such as Cipher 540S.  This is the default behavior.
  181.  
  182.      ssssiiiilllliiii Suppress illegal length indicator (this occurs on tapes like the 8mm
  183.           tape drive when a request is made to read fewer bytes than a block
  184.           was written with, when in variable block mode).  The default is to
  185.           return a short count, when set, no short count will be returned, and
  186.           the rest of the data in the block will be skipped.  This is off by
  187.           default.  This persists until explicitly turned off or the tape is
  188.           changed.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  203.  
  204.  
  205.  
  206.      eeeeiiiilllliiii Reverses the effect of ssssiiiilllliiii (returns to default).
  207.  
  208.      aaaauuuuddddiiiioooo
  209.           Set the tape device to be in audio mode if the argument is non-zero,
  210.           or in data mode (the default) if it is zero.  This is currently
  211.           supported only for DAT tapes, and allows the transfer of digital
  212.           audio music to and from the drive over the SCSI bus.  In this mode,
  213.           many of the data commands, such as weof are not allowed.  The
  214.           variable blocksize tape device should always be used when doing i/o
  215.           in audio mode.  The other tape parameters, such as recording
  216.           frequency, program number, and so on must be transferred to the
  217.           drive as part of the data stream.  In addition, rewinds and seeks
  218.           return immediately in audio mode, and further opens will block until
  219.           they are complete.  See the _t_p_s(7m) manual page for more
  220.           information.
  221.  
  222.      sssseeeeeeeekkkk Seek to the block given as the argument.  For multiple partition
  223.           tapes, this is relative to start of partition, otherwise to BOT.
  224.           When in audio mode, this specifies the program number (0 - 799)
  225.           rather than a block number.  The argument block number should be
  226.           provided as a SCSI logical block number for SCSI tape drives, except
  227.           for the STK drives, for which the argument is the block number in
  228.           vendor unique format.
  229.  
  230.      ssssttttaaaattttuuuussss
  231.           Print status information about the tape unit.  It is not necessary
  232.           to have media physically loaded to obtain status.  The position
  233.           information from the _m_t__d_p_o_s_n field of the structure returned by the
  234.           MMMMTTTTIIIIOOOOCCCCGGGGEEEETTTT is printed for all drive types.  For ttttppppssss (SCSI) drives,
  235.           status information from the _m_t__e_r_r_e_g is also printed, which gives
  236.           addition information about tape status.  The current block position
  237.           provided is the SCSI logical block address in all cases, except for
  238.           the STK drives, which report the position in vendor unique block
  239.           number format.  The numeric field "Status" contains the mt_dposn
  240.           bits in the low 16 bits, and the mt_erreg values in the upper 16
  241.           bits.  These bits are defined in /_u_s_r/_i_n_c_l_u_d_e/_s_y_s/_t_p_s_c._h.
  242.  
  243.           The meaning of the bits that are driver specific may vary from
  244.           release to release, and are primarily useful when reporting tape
  245.           problems to the customer support organization.
  246.  
  247.      bbbbllllkkkkssssiiiizzzzeeee
  248.           Print the recommended block size for io, which is used by tar, cpio,
  249.           bru, etc.  A tape cartridge need not be physically loaded to obtain
  250.           default block size, except that current block sizes will not be
  251.           accurate in this case.  The maximum, minimum, and current blocksizes
  252.           are also reported; they may all be the same if the drive does not
  253.           support variable block sizes.
  254.  
  255.      sssseeeettttbbbbllllkkkksssszzzz
  256.           Sets the block size to be used when in fixed blocksize mode.  Most
  257.           drives that support variable sized blocks also support use of
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  269.  
  270.  
  271.  
  272.           different sized blocks in the fixed block mode.  For example, this
  273.           could be used to read 8 mm tapes written with a fixed block size of
  274.           512 bytes, rather than 1024, while still reading more than 512 bytes
  275.           per system call.  If this was not done, tape errors would occur.
  276.           This size remains set until the next tape change, or until the drive
  277.           is used in variable block mode.
  278.  
  279.      rrrreeeetttteeeennnnssssiiiioooonnnn
  280.           Retension the tape in the drive.  This may be a null operation on
  281.           some drives, such as DAT.
  282.  
  283.      rrrreeeesssseeeerrrrvvvveeee
  284.           Issues a request to reserve a tape device.  This operation is
  285.           persistent and remains until explicitly removed with a rrrreeeelllleeeeaaaasssseeee
  286.           command.  The SCSI tape interface (TPSC) uses the SCSI rrrreeeesssseeeerrrrvvvveeee
  287.           command.  Tape support (TS) uses the SCSI ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee oooouuuutttt
  288.           command if it is supported by the device; otherwise, the SCSI
  289.           rrrreeeesssseeeerrrrvvvveeee command is used.  This operation requires CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT
  290.           capability.
  291.  
  292.      rrrreeeelllleeeeaaaasssseeee
  293.           Issues a release request to a tape device.  The SCSI tape interface
  294.           (TPSC) uses the SCSI rrrreeeelllleeeeaaaasssseeee command.  Tape support (TS) uses the
  295.           SCSI ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee oooouuuutttt command if it is supported by the
  296.           device; otherwise, the SCSI rrrreeeelllleeeeaaaasssseeee command is used.  This operation
  297.           requires CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT capability.
  298.  
  299.      pppprrrreeeeeeeemmmmpppptttt
  300.           Preempts reservations.  This action should only be done in error
  301.           recovery situations.  Tape support (TS) uses the preempt service
  302.           action of the SCSI ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee oooouuuutttt command to preempt
  303.           reservations made from another host.  Not all devices support the
  304.           ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee oooouuuutttt command.  This operation requires
  305.           CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT capability.
  306.  
  307.      cccclllleeeeaaaarrrr
  308.           Clears reservations.  This action should only be done in error
  309.           recovery situations.  Tape support (TS) uses the clear service
  310.           action of the SCSI ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee iiiinnnn command to clear
  311.           reservations made from another host.  Not all devices support the
  312.           ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee oooouuuutttt command.  This operation requires
  313.           CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT capability.
  314.  
  315.      pppprrrrssssvvvv Shows the persistent reservation key of the device and the active
  316.           reservation if one exists.  Tape support (TS) uses the pppprrrrssssvvvv command
  317.           on devices that support the SCSI ppppeeeerrrrssssiiiisssstttteeeennnntttt rrrreeeesssseeeerrrrvvvveeee iiiinnnn command.  The
  318.           persistent reservation key that is used by TS is the first 8 bytes
  319.           of the hostname.
  320.  
  321.      hhhheeeellllpppp Print a summary of the available options.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. mmmmtttt((((1111))))                                                                    mmmmtttt((((1111))))
  335.  
  336.  
  337.  
  338. FFFFIIIILLLLEEEESSSS
  339.      /dev/nrtape     default (no rewind) tape device
  340.  
  341. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  342.      rmt(1M), rmtops(3), mtio(7), tps(7m).
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.